package com.example.exploreactivedemo1.activities

import android.os.Bundle
import android.util.Log
import android.widget.EditText
import androidx.appcompat.app.AppCompatActivity
import com.example.exploreactivedemo1.R
import com.example.exploreactivedemo1.databinding.AgreementActivityBinding

class AgreementActivity : AppCompatActivity() {

    private lateinit var binding : AgreementActivityBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        //AgreementActivityBinding.inflate(layoutInflater) 创建了新的视图
        binding = AgreementActivityBinding.inflate(layoutInflater)
        //并且将binding.rooot设置为活动的内容视图
        setContentView(binding.root)

        //activity之间通过intent来接受数据
        var account = intent.getStringExtra("userName") as String
        Log.e("AgreementActivity112","account is ${account}")

        //获取textInput输入框
        binding.agreementLoginInput.setText(account)
    }
}